imports('../../../style/table/index');

export default renders({
    <div class="g-table-container">
    <!-- 表格左边功能栏 -->
        <% if $data.tabHead.leftType || $data.tabHead.bottomCount %>
            <div class="g-table-fixed g-table-operate ">
                <div class="g-table-thead"> 
                    <table cellspacing="0" cellpadding="0" border="0"  class="m-table-ui">
                        <thead>
                                <tr>
                                    <th>
                                        <% if $data.tabHead.leftType ==='checkbox' %>
                                            <div class="table-cell table-cell-check"><input value="all" type="checkbox"/><i class="iconfont">&#xe7ee;</i></div>
                                        <% /if %>
                                        <% if $data.tabHead.leftType ==='info' %>
                                            <div class="table-cell"></div>
                                        <% /if %>
                                    </th>
                                </tr>
                        </thead>
                    </table>
                </div>
                <% if $data.tabHead.leftType %>
                    <div class="g-table-body <% if !$data.tabHead.bottomCount %>g-table-body-nobtom<% /if %>" id="tfixData">

                    </div>
                <% /if %>
                <% if $data.tabHead.bottomCount %>
                    <div class="g-table-foot" >
                        <table cellspacing="0" cellpadding="0" border="0" class="m-table-ui">
                            <tfoot>
                                    <tr >
                                    <td><div class="table-cell">合计</div></td>
                                    </tr>
                            </tfoot>
                        </table>
                    </div>
                <% /if %>
            </div>
        <% /if %>
        <!-- 表格主体 -->
        <div class="g-table-ui <% if !$data.tabHead.leftType %>g-table-ui-noleft<% /if %>">
            <div class="g-table-thead"> 
                <table cellspacing="0" cellpadding="0" border="0"  class="m-table-ui">
                    <thead>
                        <tr >
                            <% each $data.tabHead.headArr val key %>
                                <th data-field="<% val.type %>">
                                    <div class="table-cell table-cell-<% val.type %>"><% val.name %><% if key != $data.tabHead.headArr.length-1 %><i class="f-small-border"></i><% /if %></div>
                                </th>
                            <% /each %>
                        </tr>
                    </thead>
                </table>
            </div>
            <div class="g-table-body g-scroll-table <% if !$data.tabHead.bottomCount %>g-table-body-nobtom<% /if %>"  id="tableData">
                
            </div>
            <% if $data.tabHead.bottomCount %>
                <div class="g-table-foot" id="tcountData">

                </div>
            <% /if %>
            
        </div>
    </div>
    <style>
        <% each $data.tabHead.headArr val key %>
            .table-cell-<% val.type %> {
                width: <% val.width %>px
            }
        <% /each %>
    </style>
})